<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <link href="../../style.css" rel="stylesheet" type="text/css">
    <link rel="icon" href="../images/PETSc_RGB-logo.png" type="image/png" sizes="16x16">
    <title>PETSc: Documentation: Changes: 2.0.28</title>
  </head>
  <body>

    <div id="logo">
      <h1>PETSc</h1>
    </div>

    <div id="header">
      <h1><!--begin-->Documentation: Changes: 2.0.28<!--end--></h1>
    </div>

    <hr>

    <div id="sidebar">
      <ul>
        <li><a href="../../index.html">Home</a></li>
        <li><a href="../../download/index.html">Download</a></li>
        <li><a href="../../features/index.html">Features</a></li>
        <li>
          <a href="../../documentation/index.html">Documentation</a>
          <ul>
            <li><a href="../index.html">Manual pages and Users Manual</a></li>
            <li><a href="../referencing.html">Referencing PETSc</a></li>
            <li><a href="../tutorials/index.html">Tutorials</a></li>
            <li><a href="../installation.html">Installation</a></li>
            <li><a href="../saws.html">SAWs</a></li>
            <li>
              <a href="index.html">Changes</a>
              <ul>
                <li><a href="dev.html">dev</a></li>
                <li><a href="313.html">3.13</a></li>
                <li><a href="312.html">3.12</a></li>
                <li><a href="311.html">3.11</a></li>
                <li><a href="310.html">3.10</a></li>
                <li><a href="39.html">3.9</a></li>
                <li><a href="38.html">3.8</a></li>
                <li><a href="37.html">3.7</a></li>
                <li><a href="36.html">3.6</a></li>
                <li><a href="35.html">3.5</a></li>
                <li><a href="34.html">3.4</a></li>
                <li><a href="33.html">3.3</a></li>
                <li><a href="32.html">3.2</a></li>
                <li><a href="31.html">3.1</a></li>
                <li><a href="300.html">3.0.0</a></li>
                <li><a href="233.html">2.3.3</a></li>
                <li><a href="232.html">2.3.2</a></li>
                <li><a href="231.html">2.3.1</a></li>
                <li><a href="230.html">2.3.0</a></li>
                <li><a href="221.html">2.2.1</a></li>
                <li><a href="220.html">2.2.0</a></li>
                <li><a href="216.html">2.1.6</a></li>
                <li><a href="215.html">2.1.5</a></li>
                <li><a href="213.html">2.1.3</a></li>
                <li><a href="212.html">2.1.2</a></li>
                <li><a href="211.html">2.1.1</a></li>
                <li><a href="21.html">2.1.0</a></li>
                <li><a href="2029.html">2.0.29</a></li>
                <li><span class="current">2.0.28</span></li>
                <li><a href="2024.html">2.0.24</a></li>
                <li><a href="2022.html">2.0.22</a></li>
                <li><a href="2018-21.html">2.0.18-21</a></li>
                <li><a href="2017.html">2.0.17</a></li>
                <li><a href="2016.html">2.0.16</a></li>
                <li><a href="2015.html">2.0.15</a></li>
              </ul>
            </li>
            <li><a href="../bugreporting.html">Bug Reporting</a></li>
            <li><a href="../codemanagement.html">Code Management</a></li>
            <li><a href="../faq.html">FAQ</a></li>
            <li><a href="../license.html">License</a></li>
            <li><a href="../linearsolvertable.html">Linear Solver Table</a></li>
            <li><a href="../nonlinearsolvertable.html">Nonlinear Solver Table</a></li>
	    <li><a href="../taosolvertable.html">TAO Solver Table</a></li>
          </ul>
        </li>
        <li><a href="../../publications/index.html">Applications/Publications</a></li>
        <li><a href="../../miscellaneous/index.html">Miscellaneous</a></li>
        <li><a href="../../miscellaneous/external.html">External Software</a></li>
        <li><a href="https://docs.petsc.org/en/latest/developers/index.html">Developers Site</a></li>
      </ul>
    </div>

    <!--begin-->

    <style type="text/css">
      h2 {
        color: red;
      }

      h4 {
        font-weight: bold;
        text-decoration: underline;
      }
    </style>

    <div id="main">

      <div align="center">
        <h2><a name="CHANGES">CHANGES</a> in PETSc 2.0.28 (see new <a href="#Features">features</a>)</h2>
      </div>

      <h4>General:</h4>

      <ul>
        <li>No longer support PETSC_ARCH=sun4</li>
        <li>The macros in petscconf.h now begin with PETSC_</li>

        <li>
          <code>PetsReal()</code> and <code>PetscImaginary()</code> are now
          <code>PetscRealPart()</code> <code>PetscImaginaryPart()</code>
        </li>

        <li>
          -optionstable -&gt; -options_table -optionsleft -&gt; -options_left
          but old left for compatibility
        </li>
      </ul>

      <h4>AO (Application Orderings):</h4>
      <h4>TS (Timestepping Solvers):</h4>

      <ul>
        <li>
          <code>TSSetMonitor()</code> now takes an additional final optional
          argument that monitor context.
        </li>
      </ul>

      <h4>SNES (Nonlinear Solvers):</h4>

      <ul>
        <li>SNES_EQ_LS etc changed to drop _, for example SNESEQLS</li>

        <li>
          Changed calling sequence of SNES monitoring routines to add an
          additional output parameter indicating why it converged or
          diverged.
        </li>

        <li>
          Added additional final argument to <code>SNESSetMonitor()</code>
          an optional destroy routine for the monitor context.
        </li>

        <li>
          Changed calling sequence of <code>MatSNESMFAddNullSpace()</code>
          to take <code>PCNullSpace</code> object rather than array of
          vectors.
        </li>

        <li>
          Added final ctx argument to <code>SNESGetFunction()</code>,
          <code>SNESGetGradient()</code> and
          <code>SNESGetMinimizationFunction()</code>
        </li>
      </ul>

      <h4>SLES (Linear Solvers):</h4>

      <ul>
        <li>See PC and KSP</li>

        <li>
          <code>SLESSolveTrans()</code> is now
          <code>SLESSolveTranspose()</code>
        </li>

        <li>
          <code>SLESSolve()</code> now ALWAYS returns a 0 or positive iteration
          count. Call <code>KSPGetConvergedReason()</code> to see if converged
          or diverged and why.
        </li>
      </ul>

      <h4>KSP (Krylov Subspace Methods):</h4>

      <ul>
        <li>
          Added additional final argument to <code>KSPSetMonitor()</code>
          an optional destroy routine for the monitor context.
        </li>

        <li><code>KSPSolvetrans()</code> is now <code>KSPSolveTranspose()</code></li>

        <li>
          Added flexible gmres (use fgmres or KSPFGMRES as the type) see
          <code>KSPFGMRESSetModifyPC()</code> for one way to change PC at
          each iteration.
        </li>
      </ul>

      <h4>PC (Preconditioners):</h4>

      <ul>
        <li>
          <code>MGSetRestriction()</code> and <code>MGSetInterpolation()</code>
          now accept PETSc figures out which one it is based on the number of
          rows and columns. Now you don't need to use the Shell matrices if you
          computed it &quot;the other way then PETSc use to expect&quot;.
        </li>

        <li><code>PCApplyTrans()</code> is now <code>PCApplyTranspose()</code></li>

        <li>
          options -pc_ilu_mat_ordering_type &lt;nd,...&gt; and
          -pc_lu_mat_ordering_type &lt;nd,...&gt; now set the ordering type.
        </li>
      </ul>

      <h4>MAT (Matrices):</h4>

      <ul>
        <li>
          Added two additional arguments to <code>MatCreate(MPI_Comm comm,int
            m,int n,int M,int N,Mat *)</code> where m and n are the local
          ownership sizes. To get the effect of the old
          <code>MatCreate()</code> use m and n equal to PETSC_DECIDE
        </li>

        <li>
          Changed <code>MatSetLocalToGlobalMappingBlocked()</code> to
          <code>MatSetLocalToGlobalMappingBlock()</code> so that it would
          be less then 32 characters long.
        </li>

        <li>
          <code>MatSolveTrans()</code>and <code>MatSolveTransAdd()</code> are
          now <code>MatSolveTransposeXXX()</code> <code>MatMultTrans()</code>
          and <code>MatMultTransAdd()</code>are now
          <code>MatMultTransposeXXX()</code>
        </li>

        <li>
          <code>MatCreateMPIAdj()</code> changed to
          <code>MatCreateMPICSR()</code>; <code>MatCreateSeqAdj()</code>
          dropped.
        </li>

        <li>
          Another <code>MatSetOption()</code>, <code>MAT_IGNORE_ZERO_ENTRIES</code> for
          AIJ matrices with <code>ADD_VALUES</code>.
        </li>

        <li>
          added matrix option <code>MAT_KEEP_ZEROED_ROWS</code> causes <code>
            MatZeroRows()</code> to keep the original nonzero data structure and
          just put 0.0 into the elements that are to be zeroed. Without this
          option it removes the locations from the nonzero structure.
        </li>
      </ul>

      <h4>DA (Distributed Arrays):</h4>
      <h4>VEC (Vectors):</h4>

      <ul>
        <li>Added VecGetArray2d() and VecRestoreArray2d()</li>
      </ul>

      <h4>IS (Index Sets):</h4>

      <ul>
        <li>
          Added second argument to <code>ISInvertPermutation</code>() that indicates
          how many indices are to be  stored on that processor; ignored for one
          processor code. If you use <code>ISInvertPermutation</code>()  simply add
          a second argument of <code>PETSC_DECIDE</code>.
        </li>
      </ul>

      <h4>Draw (Graphics):</h4>

      <ul>
        <li>DrawHistxxx changed to DrawHGxxx</li>
      </ul>

      <h4>Viewers:</h4>
      <h4>System:</h4>

      <ul>
        <li>
          Routines XXXRegister() are now XXXRegisterDynamic() used for
          registering new object types in dynamic libraries and
          XXXRegister_Private() is now XXXRegister() used to register new
          object types whose definitions are in the exectuable.
        </li>

        <li>
          The final argument to OptionsHasName() and
          OptionsGetXXX() is a PetscTruth * instead of an
          int*
        </li>

        <li>PETSc functions and objects that began with Table now begin with PetscTable</li>

        <li>
          Changed these routines to return an error code.  extern int
          PetscStrchr(const char[],char,char **); extern int PetscStrrchr(const
          char[],char,char **); extern int PetscStrstr(const char[],const
          char[],char **); extern int PetscStrtok(const char[],const
          char[],char **); extern int PetscStrlen(const char[],int *); added
          PetscStrallocpy(const char[],char **); PetscStrncmp() and
          PetscStrcasecmp() now return PETSC_TRUE as a final argument if the
          strings match else PETSC_FALSE. Note this means removing ! from your
          current tests and adding it where you don't have it.
        </li>

        <li>PetscMemcmp() now has a final argument of true for matching memories.</li>

        <li>
          The Fortran versions of the PetscStrxxx() and PetscMemxxx() routines
          also now have the error flag as the final argument
        </li>

        <li>
          PetscFree() now always returns an error code that may be checked with
          CHKERRQ().  On systems where free() returns a void (and the user has
          no access to an error condition in free(), PetscFree() returns 0 i.e.
          no error; on other systems it returns the error number from
          free.
        </li>

        <li>The BT bitarray macros are now prefixed with PetscBT</li>
      </ul>

      <h4>Error Handling:</h4>
      <h4>Event Logging:</h4>
      <h4>Fortran Interface:</h4>

      <div align="center">
        <h2>New <a name="Features">features</a> in PETSc 2.0.28 (see <a href="#CHANGES">changes</a> above)</h2>
      </div>

      <h4>General:</h4>

      <ul>
        <li>
          When doing string substitutions in library directory paths etc one
          must use ${PETSC_DIR} ${BOPT} etc now instead of $PETSC_DIR etc. Also
          you can put anything in {anything} as long as it is an environmental
          variable or passed in the options database with -anything
        </li>

        <li>
          Added PetscEmacsclientErrorHandler() -on_error_emacs [machinename] to
          allow emacs to jump to error; can be used with any other error
          handler.
        </li>

        <li>
          So long as you have defined the macro __FUNC__ "main" before your
          main C/C++ subroutine you can use SETERRQ() and CHKERRQ() instead of
          SETERRA(), CHKERRA().
        </li>
      </ul>

      <h4>AO (Application Orderings):</h4>
      <h4>TS (Timestepping Solvers):</h4>
      <h4>SNES (Nonlinear Solvers):</h4>

      <ul>
        <li>
          Added <code>SNESSetLineSearchParams()</code> and
          <code>SNESGetLineSearchParams()</code>, contributed by Matt
          Knepley.
        </li>

        <li>
          Added <code>SNESGetConvergedReason()</code> to find out if
          a <code>SNESSolve()</code> has converged/diverged and why
        </li>

        <li>
          Added <code>SNESMonitorVecUpdate()</code> and
          -snes_vecmonitor_update to display the Newton update at each
          iteration.
        </li>
      </ul>

      <h4>SLES (Linear Solvers):</h4>

      <ul>
        <li>See PC and KSP</li>
      </ul>

      <h4>KSP (Krylov Subspace Methods):</h4>

      <ul>
        <li>
          Added -ksp_gmres_krylov_monitor and
          <code>KSPGMRESKrylovMonitor()</code> to allow one to view the
          vectors in the Krylov space.
        </li>
      </ul>

      <h4>PC (Preconditioners):</h4>

      <ul>
        <li>
          We now provide a drop tolerance based ILU for SeqAIJ matrix format
          via Yousef Saad's SPARSEKIT2 software. Use -pc_ilu_use_drop_tolerance
          &lt;dt,dtcol,rowmax&gt; or
          <code>PCILUSetUseDropTolerance</code>(pc,dt,dtcol,rowmax).
        </li>
      </ul>

      <h4>MAT (Matrices):</h4>
      <h4>DA (Distributed Arrays):</h4>
      <h4>VEC (Vectors):</h4>
      <h4>IS (Index Sets):</h4>
      <h4>Draw (Graphics):</h4>

      <ul>
        <li><code>DrawCreate()</code> and <code>DrawOpenX()</code> now can take</li>
      </ul>

      <h4>Viewers:</h4>

      <ul>
        <li>
          Added <code>ViewerASCIIUseTabs()</code> to allow turning off
          tabbing during certain viewer operations.
        </li>

        <li>
          Added <code>ViewerGetSingleton()</code>, ViewerRestoreSingleton()
          to allow managing the calling a a sequential viewer from within
          a parallel viewer.
        </li>

        <li>Added <code>ViewerASCIISynchronizedPrintf</code>(viewer,....)</li>

        <li>
          Binary and ASCII viewers can create compressed files by simply
          appending a .gz on the filename.
        </li>

        <li>
          PETSc now has a new viewer that generates rudimentary Postscript.
          Improvements, additions may be added as needed.
          <code>DrawOpenPS()</code>, or
          <code>DrawSetType(,DRAW_PS);</code> or -draw_type ps
        </li>
      </ul>

      <h4>System:</h4>

      <ul>
        <li>
          using -trdump with PETSC_USE_STACK compile option (default for
          BOPT=g*) will print the entire stack for each malloc, allow one to
          more easily track down where mallocs where made that where not
          freed.
        </li>

        <li>Added PetscSum_Op to replace MPI_SUM for reductions with MPIU_SCALAR</li>
        <li>Added PetscMaxSum_Op to do max on first half of entries and sum on second half.</li>
        <li>Added CHKMEMQ and CHKMEMA macros to help track down memory corruption.</li>
      </ul>

      <h4>Error Handling:</h4>
      <h4>Event Logging:</h4>
      <h4>Fortran Interface:</h4>

      <ul>
        <li>Added Fortran 90 interface support for HP Convex and Solaris.machine.</li>
      </ul>

    </div>

    <!--end-->

    <hr>

  </body>
</html>
